package habitcoach.core.habit;

import habitcoach.core.task.Task;

import java.util.Date;

public interface Habit
{
	/**
	 * Get question of the habit which is used to remind the user.
	 * 
	 * @return
	 */
	public abstract String getQuestion();

	/**
	 * Get starting date
	 * 
	 * @return
	 */
	public abstract Date getStartDate();

	public HabitStatus getStatus();

	public void setStatus(HabitStatus status);

	public static final HabitStatus DEFAULT_HABIT_STATUS = HabitStatus.UNSTARTED;

	/**
	 * Title of the habit
	 * 
	 * @return
	 */
	public String getTitle();

	/**
	 * Category of the habit
	 * 
	 * @return
	 */
	public String getCategory();

	/**
	 * Append a task to this habit. This usually mean add one more day to form
	 * this habit because the user haven't done well.
	 * 
	 * @param task
	 */
	public void appendTask(Task task);

	/**
	 * Get current index of the task list. The index represents which task of
	 * the task list is processing.
	 * 
	 * @return
	 */
	public int getIndex();

	/**
	 * Get task by its index. the index should be within 0 to length of task
	 * list.
	 * 
	 * @param index
	 * @return
	 */
	public Task getTask(int index);

	/**
	 * Get length of the task list.
	 * 
	 * @return
	 */
	public int getTaskCount();

	/**
	 * Get habit ID
	 * 
	 * @return
	 */
	public int getID();

}